package com.accenture.portal.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.accenture.portal.dao.UserMapper;
import com.accenture.portal.model.User;

@Repository
public class UserMapperImpl implements UserMapper {
	
	@Autowired
	private UserMapper um;

	@Override
	public User login(Integer user_id) {
		return um.login(user_id);
	}

	@Override
	public User searchById(Integer user_id) {
		return um.searchById(user_id);
	}

	@Override
	public void uploadImg(User user) {
		// TODO Auto-generated method stub
		um.uploadImg(user);
	}
	
	@Override
	public void add(User user) {
		um.add(user);
	}

	/**
	 * ���� id ɾ�� ����
	 */
	public void delete(int id) {
		um.delete(id);
	}
	
	/**  
     * ���� id ��ѯ ��Ӧ����  
     */  
    public User findById(int id) {  
        User user = um.findById(id);  
        return user;  
    }  
	
	 
    /**  
     * ���� id �޸Ķ�Ӧ����  
     */  
    public void update(User user) {  
    	 um.update(user);
		//return ReturnParameter; 
    }  

	public List<User> findAll() {
		List<User> findAllList = um.findAll();
		return findAllList;
	}

	@Override
	public int totalCount() {
		// TODO Auto-generated method stub
		return um.totalCount();
	}

	@Override
	public List<User> searchByPage(int start, int end) {
		// TODO Auto-generated method stub
		return um.searchByPage(start, end);
	}

	@Override
	public List<User> searchByname(String name) {
		// TODO Auto-generated method stub
		return um.searchByname(name);
	}
	
	@Override
	public List<User> searchUser(String userSearchWords){
		return um.searchUser(userSearchWords);
	}


	@Override
	public int loginErrorTimes(int id) {
		return um.loginErrorTimes(id);
	}

	@Override
	public User modifyUserPassword(String user_name, String user_password) {
		return um.modifyUserPassword(user_name, user_password);
	}




	@Override
	public void updateModifyUserPassword(User user) {
		um.updateModifyUserPassword(user);
	}

	@Override
	public User confirmUserName(String user_name) {
		return um.confirmUserName(user_name);
	}

	@Override
	public User confirmTel(String user_cellphone) {
		return um.confirmTel(user_cellphone);
	}


	@Override
	public User confirmEmail(String user_email) {
		return um.confirmEmail(user_email);
	}

	@Override
	public void register(User user) {
		um.register(user);
	}

	@Override
	public void activationUser(String user_name) {
		um.activationUser(user_name);
	}






}
